//
//  ESRootClass.m
//  __PRODUCTNAME__
//
//  Created by dllo on 16/08/15
//  Copyright (c) dllo. All rights reserved.
//

#import "ESRootClass.h"
#import "ALData.h"

@implementation ESRootClass

+ (NSDictionary *)objectClassInArray{
    return @{@"data" : [ALData class]};
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<ALData *> *alDataArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ALData *alData = [ALData modelWithDic:dic];
            [alDataArray addObject:alData];
        }
        _data = alDataArray;
    }
}


@end
